package com.chance.cc.crawler.development.command.publish.douyin;

import com.chance.cc.crawler.core.CrawlerJob;
import com.chance.cc.crawler.development.command.job.domain.douyin.daliy.DouyinAccountPhoneCrawlerScheduleJob;
import com.chance.cc.crawler.development.command.job.domain.douyin.daliy.DouyinSearchCrawlerScheduleJob;
import com.chance.cc.crawler.development.command.job.domain.douyin.DouyinSearchPhoneCrawlerScheduleJob;
import com.chance.cc.crawler.development.command.script.douyin.DYCrawlerScript;
import com.chance.cc.crawler.development.command.script.douyin.DYPhoneCrawlerScript;
import com.chance.cc.crawler.development.command.trigger.domain.douyin.DYAccountPhoneScheduleTrigger;
import com.chance.cc.crawler.development.command.trigger.domain.douyin.DYCrawlerScheduleTrigger;
import com.chance.cc.crawler.development.command.trigger.domain.douyin.DYSearchPhoneScheduleTrigger;

/**
 * @author bx
 * @date 2020/12/7 0007 11:36
 */
public class DYPublishCrawlerJob {

    public static final String metaServerIP = "192.168.1.215";
    public static final int metaServerPort = 9599;

    public static void main(String[] args) {

        publishCrawlerJob();
    }

    public static void publishCrawlerJob(){
        //发布采集job
        CrawlerJob crawlerJob = DouyinSearchCrawlerScheduleJob.publishDYSearchCrawlerScheduleJobInfo();
        DYCrawlerScheduleTrigger.publishDYSearchScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey());
        DYCrawlerScript.publishCrawlerNodeScript();

        //发布手机job--关键词
        DouyinSearchPhoneCrawlerScheduleJob.publishDYPhoneCrawlerSheduleJobInfo();
        DYSearchPhoneScheduleTrigger.publishDYSearchScheduleTriggerInfo();

//        发布手机job--账户
        DouyinAccountPhoneCrawlerScheduleJob.publishDYAccountPhoneCrawlerSheduleJobInfo();
        DYAccountPhoneScheduleTrigger.publishDYSearchScheduleTriggerInfo();

        DYPhoneCrawlerScript.publishCrawlerPhoneScript();
    }
}
